package com.mall.implementation;

import com.mall.core.Customer;
import com.mall.core.Inventory;
import com.mall.core.PerformanceData;
import com.mall.core.Store;
import com.mall.util.StringWrapper;

public class StoreOwnerImpl  implements com.mall.core.StoreOwner {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int id=0;
	private StringWrapper username;
	private StringWrapper password;
	private StringWrapper address;
	private StringWrapper name;
	private StringWrapper city;
	private StringWrapper zipcode;
	private StringWrapper phonenumber;
	private StringWrapper email;

	private boolean login =false;
	private boolean signup = false;
	private boolean logout = false;
	private boolean instore = false;
	private boolean inmall = false;
	private boolean backend = false;
	
	@Override
	public boolean login() {
		login =false;
		logout = false;
		instore = false;
		inmall = true;
		backend = false;

		logout = false;
		return login =true;
	}

	@Override
	public boolean logout() {
		login = false;
		instore = false;
		inmall = true;
		backend = false;
		return logout = true;
	}

	@Override
	public void signup() {
		signup = true;
		
	}

	@Override
	public boolean isInStore() {

		return instore;
	}

	@Override
	public boolean isInMall() {
		
		inmall = (login && !instore) ;
		return inmall;
	}

	@Override
	public boolean isInFrontEnd() {
		
		return signup && login == false;
	}

	@Override
	public boolean isInbackEnd() {
		
		return backend;
	}

	@Override
	public boolean isLoggedOut() {
	
		return logout;
	}

	@Override
	public boolean isLogedIn() {
		
		return login;
	}
	@Override
	public boolean EnterStore() {
		login =true;
		logout = false;
		instore = true;
		inmall = true;
		backend = false;

		return instore;
	}
	@Override
	public boolean leavestore() {
		login =true;
		logout = false;
		instore = false;
		inmall = true;
		backend = false;
	return instore;
	}
	@Override
	public boolean gotoBackend() {
		login =false;
		logout = false;
		instore = false;
		inmall = false;
		backend = true;

		return backend;
	}
		
	@Override
	public StringWrapper getName() {
		// TODO Auto-generated method stub
		return this.name;
	}


	@Override
	public StringWrapper getPassword() {
		// TODO Auto-generated method stub
		return this.password;
	}


	@Override
	public StringWrapper getAddress() {
		// TODO Auto-generated method stub
		return this.address;
	}


	@Override
	public boolean addItemsToStoreInventory() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean updateStoreInventory(Inventory inventory) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void removeItemsFromInventory() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void BanCustomer(Customer customer) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void unBanCustomer() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public PerformanceData checkStorePerformance(Store store) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void applyForStore() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void createStoreInventory() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public int getId() {
		// TODO Auto-generated method stub
		return this.id;
	}

	@Override
	public void setId(int id) {
		this.id = id;
		
	}

	@Override
	public StringWrapper getUserName() {
		// TODO Auto-generated method stub
		return username;
	}



	@Override
	public StringWrapper getCityName() {
		// TODO Auto-generated method stub
		return city;
	}


	@Override
	public StringWrapper getZipCode() {
		// TODO Auto-generated method stub
		return zipcode;
	}

	@Override
	public StringWrapper getPhoneNumber() {
		// TODO Auto-generated method stub
		return phonenumber;
	}

	@Override
	public void setName(StringWrapper name) {
	 this.name =name;
		
	}

	@Override
	public void setPassword(StringWrapper password) {
		this.password=password;
		
	}

	@Override
	public void setAddress(StringWrapper address) {
		this.address =address;
		
	}

	@Override
	public void setUserName(StringWrapper username) {
		this.username=username;
		
	}

	@Override
	public void setCityName(StringWrapper city) {
		this.city=city;
		
	}

	@Override
	public void setUserZipCode(StringWrapper zipcode) {
		this.zipcode=zipcode;
		
	}

	@Override
	public void setPhoneNumber(StringWrapper phonenumber) {
		this.phonenumber= phonenumber;
		
	}



}
